﻿using System.Web.Mvc;
using SuperStar.Models;

namespace SuperStar.Controllers
{
    public class HomeController : Controller
    {
        private readonly ProductModels _productModel = new ProductModels();
        public ActionResult Index()
        {
            ViewBag.Message = "Super Star";

            return View("Index");
        }
        public ActionResult HotProduct()
        {
            var model = _productModel.GetHotProducts();
            return PartialView("HotProduct",model);
        }

        public ActionResult NewProduct()
        {
            var model = _productModel.GetNewProducts();
            return PartialView("NewProduct",model);
        }

    }
}